import request from "/@/utils/request"
/**
 * 获取物料
 * @param data
 */
export function getAllMaterials(data?: any) {
    return request({
        url: '/wms/material/GetAllMaterials',
        method: 'post',
        data: data
    })
}
/**
 * 获取工序
 * @param data
 */
export function getAllProcess(data?: any) {
    return request({
        url: '/wms/process/GetAllProcessListNoPage',
        method: 'post',
        data: data
    })
}
/**
 * 获取仓库
 * @param data
 */
export function getAllWarehouse(data?: any) {
    return request({
        url: '/wms/warehouse/GetAllWarehouse',
        method: 'post',
        data: data
    })
}
/**
 * 新增补打标签
 * @param data
 */
export function insertBarcode(data?: any) {
    return request({
        url: '/wms/barcode/InsertBarcode',
        method: 'post',
        data: data
    })
}
/**
 * 获取货位
 * @param data
 */
export function getLocationLists(data?: any) {
    return request({
        url: '/wms/location/GetLocationLists',
        method: 'post',
        data: data
    })
}
/**
 * 获取收料单
 * @param data
 */
export function getReceiptDetails(data?: any) {
    return request({
        url: '/wms/receipt/GetReceiptDetails',
        method: 'post',
        data: data
    })
}
/**
 * 获取收料单条码
 * @param data
 */
export function GetReceiptBarcodes(data?: any) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/getMakeUpRecordPageSet',
        method: 'get',
        params: data
    })
}
/**
 * 获取收料单条码
 * @param data
 */
export function GetReceiptBarcodeList(data?: any) {
    return request({
        url: '/wms/barcode/GetReceiptBarcodes',
        method: 'post',
        data: data
    })
}
/**
 * 盘点补打发送打印机
 * @param data
 */
export function sendPrint(url ,data?: any) {
    return request({
        url: url + '/print/RawMaterialBarCodePrint',
        method: 'post',
        params: data
    })
}

/**
 * 根据收料单明细创建标签entity
 * @param data
 */
export function GetBarcodesByReceipt(data?: any) {
    console.info(data.ReceiptDetailId);
    if(data.ReceiptDetailId==0)return;
    return request({
        url: '/wms/barcode/GetBarcodesByReceipt',
        method: 'post',
        data: data
    })
}
/**
 * 根据收料单明细创建标签
 * @param data
 */
export function createBarcodesByReceipt(data?: any) {
    return request({
        url: '/wms/barcode/CreateBarcodesByReceipt',
        method: 'post',
        data: data
    })
}
/**
 * 从值集获取供应商
 * @param data
 */
export function getDicItems(data?: any) {
    return request({
        url: '/wms/dic/GetDicItems',
        method: 'post',
        data: data
    })
}
/**
 * 条码打印
 * @param data
 */
export function printQrcode(data?: any) {
    return request({
        url: '/wms/commonBarcode/PrintQrcode',
        method: 'post',
        data: data
    })
}

/**
 * 删除条码
 * @param data
 */
export function delReceiptBarcode(data?: any) {
    return request({
        url: '/wms/receipt/DelReceiptBarcode',
        method: 'post',
        data: data
    })
}

/**
 * 修改条码数量
 * @param data
 */
export function updReceiptBarcodeQty(data?: any) {
    return request({
        url: '/wms/receipt/UpdReceiptBarcodeQty',
        method: 'post',
        data: data
    })
}